package com.ld.security.auth.common.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.anno.IdKey;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.base.entity.ESortEntity;
import com.ld.security.common.mybatis.base.entity.LabelMap;
import com.ld.security.common.mybatis.base.entity.TreeEntity;
import com.ld.security.auth.common.sys.constant.SysPerConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("sys_per")
@ApiModel("权限")
@Data
public class SysPerEntity  extends TreeEntity<SysPerEntity> implements LabelMap,ESortEntity
{


  @ApiModelProperty("编码")
  private String name;

  @LabelKeys
  @ApiModelProperty("权限类型")
  private SysPerConstant.perType perType;

  @ApiModelProperty("图标")
  private String logo;


  private MapJson labelMap;


  @ApiModelProperty("组件路径")
  private String compPath;

  @ApiModelProperty("访问路径")
  private String path;

  @ApiModelProperty("链接地址")
  private String linkUrl;

  @ApiModelProperty("是否隐藏")
  private Boolean hidden;

  @ApiModelProperty("排序值")
  private Integer sortVal;

  @ApiModelProperty("组件缓存")
  private Boolean noCache;

  @IdKey("name")
  @Override
  public String getId() {
    return super.getId();
  }
}
